package src;

import java.util.ArrayList;
import java.util.Collection;

/**
 * Created by dell on 2017/7/25.
 */
public class CollectionTest {
    public static void main(String[] args) {
        Collection c= new ArrayList();
        c.add("I love you!");
        c.add(4);
        System.out.println(c.size());
        c.remove(4);
        System.out.println(c.size());
        System.out.println("c集合中是否包含“I love you!字符串？”"+c.contains("I love you!"));
        c.add("hello world");
        System.out.println(c);
//        c.clear();
//        System.out.println(c);
        for(Object f:c){
            System.out.println(f);
        }
    }
}
